home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12598 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: news.luc.edu!user
  2. From: VArase@varase.it.luc.edu (Verne Arase)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Borland C's tmpnam()
  5. Date: Mon, 01 Apr 1996 16:48:44 -0600
  6. Organization: LUMC
  7. Message-ID: <AD85B96C9668FEE74@mcdiala11.it.luc.edu>
  8. References: <AD75E5DC9668E2A52@mcdiala13.it.luc.edu> <Pine.A32.3.91.960322134158.23347A-100000@red.weeg.uiowa.edu> <AD78E5E796681EC58@mcdialb10.it.luc.edu> <827626790snz@genesis.demon.co.uk> <AD7CDFD39668AABD2@mcdiala01.it.luc.edu> <828276946snz@genesis.demon.co.uk> <AD84A73496681719A2@mcdiala03.it.luc.edu> <andrewrDp62z2.uw@netcom.com>
  9. NNTP-Posting-Host: 147.126.240.111
  10.  
  11. In article <andrewrDp62z2.uw@netcom.com>,
  12. andrewr@netcom.com (Andrew Reddig) wrote:
  13.  
  14.  >So, Borland could return an 8.3 filename, "C:\TEMP\BORLAND.001", or 
  15.  >whatever as long as you can open the file and not collide with an 
  16.  >existing file.  What you get by looking at the filename is undefined.
  17.  
  18. Actually, all it returns is "tmp<n>.$$$", where <n> is 1:2^16-1.
  19.  
  20.  >If the standard is silent on where the temporary file is located, a
  21.  >conforming program couldn't change directories and assume that the file
  22. is
  23.  >put in that directory anyway; a conforming implementation could 
  24.  >automagically put all temporary files in /tmp. 
  25.  
  26. If all you wanted was some temporary scratch space, that'd be fine. (Though
  27. often you may want to place your scratch file in another directory or on
  28. another volume with different access privledge or to avoid head
  29. contention).
  30.  
  31. The problem is that if you want to do the old-master, new-master,
  32. update-file update and swap, you need the ability to define a new file in
  33. your target file directory without running into another file already there.
  34.  
  35. ---
  36. The above are my own opinions, and not those of my employer.
  37.